package com.cq.hd.task.web.job;

import com.cq.hd.member.api.TbWithdrawalBillApi;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class WithdrawalTask {

    @Autowired
    private TbWithdrawalBillApi withdrawalBillApi;

    // 扫描提现中的hf提现交易，如果状态成功，则修改提现状态，如果提现失败，则退款
    // 每隔30m扫描一次 0 */30 * * * ?
    @XxlJob("scanWithdrawalBill")
    public void scanWithdrawalBill() {
        log.info("扫描提现中的提现流水=====>开始");
        withdrawalBillApi.scanWithdrawalBill();
        log.info("扫描提现中的提现流水=====>结束");
    }

}
